//
//  FindViewController.m
//  07_Work
//
//  Created by dllo on 16/7/23.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "FindViewController.h"
#import "HomePageViewController.h"

@interface FindViewController ()

@end

@implementation FindViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor greenColor];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(20, 20, 70, 30);
    button.titleLabel.font = [UIFont systemFontOfSize:20];
    [button setTitle:@"back" forState:UIControlStateNormal];
    [self.view addSubview:button];
    [button addTarget:self action:@selector(backClick:) forControlEvents:UIControlEventTouchUpInside];
}

- (void)viewWillAppear:(BOOL)animated {
    self.tabBarController.tabBar.hidden = YES;
    self.navigationController.navigationBarHidden = YES;
}

- (void)backClick:(UIButton *)button {
    // tabBar视图之间的跳转
    self.tabBarController.selectedIndex = 0;
    self.tabBarController.tabBar.hidden = NO;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
